#include <stdio.h>
#include <string.h>
const int N=30010;
int main()
{
    int  n, x, i, count = 0;
    char a[N];
    scanf("%s",a);
    n=strlen(a);
    x=n;
    while(x!=1){
        for (i = 0; i < n; i++) {
            if (a[i] != ' '){     	
                count++;       		
            }
            if (count == 1999){
                a[i] = ' ';      		
                count = 0;
                x--;          		 
            }
        }
    }       						 
    for (i = 0; i < n; i++){
    	if(a[i]=='?'){
    		printf("yes");
    		return 0;
		}
	}
	printf("no");      	
    return 0;
}
